<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%user_consignee}}".
 *
 * @property integer $id
 * @property integer $user_id
 * @property string $relation
 * @property string $realname
 * @property string $mobile
 * @property integer $sex
 * @property string $idcard
 * @property string $wechat_name
 * @property string $email
 * @property string $address
 */
class UserConsignee extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%user_consignee}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id'], 'required'],
            [['user_id', 'sex'], 'integer'],
            [['relation', 'realname', 'mobile', 'idcard', 'wechat_name', 'email', 'address'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'relation' => '受托关系',
            'realname' => '姓名',
            'mobile' => '手机号码',
            'sex' => '性别',
            'idcard' => '身份证',
            'wechat_name' => '微信号码',
            'email' => '邮箱',
            'address' => '住址',
        ];
    }
}
